package com.taotao.openapi2.config;

import org.noear.solon.annotation.Component;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.Filter;
import org.noear.solon.core.handle.FilterChain;


@Component(index = 0)
public class FileDeleteFilter implements Filter {
    @Override
    public void doFilter(Context ctx, FilterChain chain) throws Throwable {
        chain.doFilter(ctx);
        
        if (ctx.isMultipartFormData()) {
            ctx.filesDelete(); //v2.7.3 后支持
        }
    }
}